<template>
	<view class="BeefFood">
		<view class="BFList" v-for="(item,index) in storesData" :key="index">
			<!-- 图片 -->
			<view class="stores_list">
				<image class="Img" :src="item.logo ? ImgUrl+item.logo : '../../static/images/stores_list.png'" mode=""></image>
			</view>
			<!-- 文字 -->
			<view class="Beeffood">
				<view class="Food">{{item.name}}
				</view>
				<view class="Foodfood">{{item.services.substr(0,2)}}|{{item.services.substr(2,2)}}</view>
				<view class="Details" @click="$router.push({path : '/pages/StoreDetails/StoreDetails',query:{id : item.id}})">查看详情</view>
			</view>
		</view>
	</view>
</template>

<script>
	import {
		storesList
	} from "../../apis/index.js"
	import {
		IMAGE_BASE_URL
	} from "../../config/index.js"
	export default {
		data() {
			return {
				ImgUrl : IMAGE_BASE_URL,
				query: {
					page: 1,
					psize: 10
				},
				storesData: [],
			}
		},
		created() {
			this.getstoresList()
		},
		methods: {
			async getstoresList() {
				let res = await storesList(this.query)
				console.log("门店信息列表", res);
				this.storesData = res.list
			},
			// SetUp(id){
			// 	uni.navigateTo({
			// 		url:'/pages/StoreDetails/StoreDetails?id='+id
			// 	})
			// }
		}
	}
</script>

<style lang="less">
	.BeefFood {}

	.BFList {
		height: 240rpx;
		background-color: #fff;
		margin: 23rpx 10rpx 20rpx 10rpx;
		display: flex;
	}

	.stores_list {
		display: flex;
		align-items: center;

		.Img {
			width: 185rpx;
			height: 185rpx;
			margin-left: 18rpx;
			margin-right: 24rpx;
		}
	}

	.Beeffood {
		padding-top: 30rpx;
		box-sizing: border-box;

		.Food {
			font-size: 33rpx;
		}

		.Foodfood {
			font-size: 28rpx;
			padding-top: 26rpx;
			color: #9e9e9e;
		}

		.Details {
			width: 122rpx;
			height: 41rpx;
			color: #fff;
			font-size: 18rpx;
			background-color: #5eadf0;
			margin-top: 25rpx;
			border-radius: 5rpx;
			text-align: center;
			line-height: 40rpx;
			// padding: 11rpx 22rpx;
		}
	}
</style>